package com.demo2;

public class StringBuilderDemo4 {
    public static void main(String[] args) {
        //链式编程
        //1.创建对象
        StringBuilder builder = new StringBuilder();
        //2.添加字符串
        builder.append("aaa").append("bbb").append("ccc").append("ddd");
        System.out.println(builder);
        //3.把StringBuilder变回字符串
        String string = builder.toString();
        System.out.println(string);
    }
}
